using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;

public partial class _Default : Page
{
    private Control ct;
    private HtmlGenericControl htmgen;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["viewid"] == null)
        {
            PHContents.Controls.Clear();
            htmgen = new HtmlGenericControl("div");
            ct = Page.LoadControl("Controls/CT_Login.ascx");
            htmgen.Controls.Add(ct);
            PHContents.Controls.Add(htmgen);
        }
        else
        {
            PlaceHolder1.Controls.Clear();
            htmgen = new HtmlGenericControl("div");
            ct = Page.LoadControl("Controls/HomeMenu.ascx");
            htmgen.Controls.Add(ct);
            PlaceHolder1.Controls.Add(htmgen);

            string viewid = Request.QueryString["viewid"].Trim();
            PHContents.Controls.Clear();
            htmgen = new HtmlGenericControl("div");
            ct = Page.LoadControl("Controls/CT_ViewMarkByClass.ascx");
            htmgen.Controls.Add(ct);
            PHContents.Controls.Add(htmgen);
        }
    }
}